package com.yhp;

import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

//war包启动类
public class WarBegin extends SpringBootServletInitializer {
    //注意:部署到服务器上后，访问地址会多一个项目名，开发环境中是省略项目名称的
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        //指向SpringBoot程序的启动类:Begin
        return builder.sources(Begin.class);
    }
}
